package br.com.absolutech.study.chapter7.pag332;

import java.util.ArrayList;
import java.util.List;

public class ProbGenUnboxing {

	public static void main(String[] args) {
		
		List test = new ArrayList();
		test.add(43);
		int x = (Integer) test.get(0); //eh preciso converter !! Senao vai dar 
		// erro de compilacao: 'Cannot convert from Object to int'
		
		List<Integer> test2 = new ArrayList<Integer>();
		test2.add(343);
		int x2 = test2.get(0); //a conversao nao eh necessaria
	}
}
